﻿CREATE TABLE [dbo].[QuanTri_PhanNhomNguoiDung] (
    [ID]         INT IDENTITY (1, 1) NOT NULL,
    [UserID]     INT NULL,
    [MaNhomUser] INT NULL,
    PRIMARY KEY CLUSTERED ([ID] ASC),
    CONSTRAINT [FK_QuanTri_PhanNhomNguoiDung_DanhMuc_NguoiDung] FOREIGN KEY ([UserID]) REFERENCES [dbo].[DanhMuc_NguoiDung] ([UserID]) ON DELETE CASCADE ON UPDATE CASCADE,
    CONSTRAINT [FK_QuanTri_PhanNhomNguoiDung_DanhMuc_NhomNguoiDung] FOREIGN KEY ([MaNhomUser]) REFERENCES [dbo].[DanhMuc_NhomNguoiDung] ([MaNhomUser]) ON DELETE CASCADE ON UPDATE CASCADE
);

